﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Dln.Common.Helper;
using Dln.Handler;
using Dln.Model;

public partial class SendMessage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var uptModel = SqlHelper.Context.From<WeChatUsers>().Where(d => d.ISSendWeChat1 == 1).ToList();
        if (uptModel != null && uptModel.Count > 0)
        {
            foreach (var item in uptModel)
            {
                MessageHelper.OrderPayNotice(item.Openid,
                                "患者统计",
                               DateTime.Now.ToString("yyyy - MM - dd HH: mm:ss"),
                               "1",
                               "点击通知查看详细，如有任何疑问直接回复公众号。",
                                "http://www.healthyperson.cn/Page/AutoUpdate/WeChatStatics.aspx?NowDateTime=" + DateTime.Now.Date
                            );
            }
        }
    }
}